package org.jeecg.modules.ParameterModule.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.ParameterModule.entity.*;
import org.jeecg.modules.ParameterModule.mapper.FormalCategoryInfoMapper;
import org.jeecg.modules.ParameterModule.service.FormalCategoryInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FormalCategoryInfoServiceImpl extends ServiceImpl<FormalCategoryInfoMapper, CountDataInfo> implements FormalCategoryInfoService {
    @Autowired
    private FormalCategoryInfoMapper logicMapper;

    /**添加pine类列表*/
    @Override
    public int add_category_pinglei2(MlccCategoryTestInfo testInfo) {
        try {
            logicMapper.add_category_pinglei2(testInfo);
            return 1;
        }catch (Exception e){
            System.out.print("添加新品类失败"+e.toString());
            return 0;
        }
    }
    /**编辑pine类名称*/
    @Override
    public int update_category_pingleiName(MlccCategoryTestInfo testInfo) {
        try {
            logicMapper.update_category_pingleiName(testInfo);
            return 1;
        }catch (Exception e){
            System.out.print("修改失败"+e.toString());
            return 0;
        }
    }
    /**根据id查询品类详情*/
    @Override
    public MlccCategoryTestInfo select_testcategoryDetail(String category_id) {
        MlccCategoryTestInfo datainfo = logicMapper.select_testcategoryDetail(category_id);
        return datainfo;
    }
    /**根据编号查询正式品类详情*/
    @Override
    public MlccCategoryInfo select_zscategoryDetail(String category_code) {
        MlccCategoryInfo datainfo = logicMapper.select_zscategoryDetail(category_code);
        return datainfo;
    }
    /**根据编号和上级id查询正式参数详情*/
    @Override
    public MlccCategoryInfo select_canshuDetailById(String category_code, String zs_pingleiId) {
        MlccCategoryInfo datainfo = logicMapper.select_canshuDetailById(category_code,zs_pingleiId);
        return datainfo;
    }
    /**根据编号和上级和定制id查询正式品类详情*/
    @Override
    public MlccCategoryInfo select_zscategoryDetailByother(String category_code, String zs_pingleiId, String dingzhi_id) {
        MlccCategoryInfo datainfo = logicMapper.select_zscategoryDetailByother(category_code,zs_pingleiId,dingzhi_id);
        return datainfo;
    }
    /**根据编号和上级id查询正式品类详情*/
    @Override
    public MlccCategoryInfo select_zscategoryDetail2(String category_code, String topid) {
        MlccCategoryInfo datainfo = logicMapper.select_zscategoryDetail2(category_code,topid);
        return datainfo;
    }

    /**统计数据*/
    @Override
    public int count_dingzhi(String category_id) {
        return logicMapper.count_dingzhi(category_id);
    }
    @Override
    public int count_huchi(String category_id) {
        return logicMapper.count_huchi(category_id);
    }
    @Override
    public int count_xiuzi(String category_id) {
        return logicMapper.count_xiuzi(category_id);
    }
    @Override
    public int count_zhuangse(String category_id) {
        return logicMapper.count_zhuangse(category_id);
    }
    @Override
    public int count_jing_bodysize(String category_id) {
        return logicMapper.count_jing_bodysize(category_id);
    }
    @Override
    public int count_cheng_bodysize(String category_id) {
        return logicMapper.count_cheng_bodysize(category_id);
    }
    @Override
    public int count_fanxiu(String category_id) {
        return logicMapper.count_fanxiu(category_id);
    }

    @Override
    public int count_gongyi(String category_id) {
        return logicMapper.count_gongyi(category_id);
    }

    @Override
    public int count_xiuzi_color(String category_id) {
        return logicMapper.count_xiuzi_color(category_id);
    }

    @Override
    public int count_xiuzi_font(String category_id) {
        return logicMapper.count_xiuzi_font(category_id);
    }

    @Override
    public int count_xiuzi_img(String category_id) {
        return logicMapper.count_xiuzi_img(category_id);
    }

    /**根据品类id查询定制项*/
    @Override
    public List<SmalltemplateTestInfo> query_dingzhiBycategoryId(String category_id) {
        List<SmalltemplateTestInfo> datalist = logicMapper.query_dingzhiBycategoryId(category_id);
        return datalist;
    }
    /**根据定制项id查询定制项*/
    @Override
    public SmalltemplateTestInfo query_dingzhiBydingzhId(String dingzhi_id) {
        SmalltemplateTestInfo datainfo = logicMapper.query_dingzhiBydingzhId(dingzhi_id);
        return datainfo;
    }
    /**新增定制项*/
    @Override
    public int add_dingzhi(SmalltemplateTestInfo dingzhi) {
        try {
            logicMapper.add_dingzhi(dingzhi);
            return 1;
        }catch (Exception e){
            System.out.print("新增失败"+e.toString());
            return 0;
        }
    }
    /**编辑定制项*/
    @Override
    public int update_dingzhi(SmalltemplateTestInfo dingzhi) {
        try {
            logicMapper.update_dingzhi(dingzhi);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**删除定制项*/
    @Override
    public int delete_dingzhi(String dingzhi_id) {
        try {
            logicMapper.delete_dingzhi(dingzhi_id);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**测试参数列表*/
    @Override
    public IPage<MlccCategoryTestInfo> query_testCanshuPageList(Page<MlccCategoryTestInfo> page, String topcategory_id, String module_id, String queryName) {
        IPage<MlccCategoryTestInfo> pagelist = logicMapper.query_testCanshuPageList(page,topcategory_id,module_id,queryName);
        return pagelist;
    }
    /**添加定制下的参数*/
    @Override
    public int add_dingzhi_canshu(MlccCategoryTestInfo dingzhi) {
        try {
            logicMapper.add_dingzhi_canshu(dingzhi);
            return 1;
        }catch (Exception e){
            System.out.print("添加失败"+e.toString());
            return 0;
        }
    }
    /**修改定制下的参数*/
    @Override
    public int update_dingzhi_canshu(MlccCategoryTestInfo dingzhi) {
        try {
            logicMapper.update_dingzhi_canshu(dingzhi);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**删除定制下的参数*/
    @Override
    public int delete_dingzhi_canshu(String canshu_id) {
        try {
            logicMapper.delete_dingzhi_canshu(canshu_id);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**互斥项列表*/
    @Override
    public IPage<MutexTestInfo> query_testHuchiPageList(Page<MutexTestInfo> page, String topid, String queryName, String queryTime) {
        IPage<MutexTestInfo> pagelist = logicMapper.query_testHuchiPageList(page,topid,queryName,queryTime);
        return pagelist;
    }
    /**新增互斥项列表*/
    @Override
    public int add_huchi(MutexTestInfo mutexTestInfo) {
        try {
            logicMapper.add_huchi(mutexTestInfo);
            return 1;
        }catch (Exception e){
            System.out.print("新增失败"+e.toString());
            return 0;
        }
    }
    /**编辑互斥项列表*/
    @Override
    public int update_huchi(MutexTestInfo mutexTestInfo) {
        try {
            logicMapper.update_huchi(mutexTestInfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**删除互斥项列表*/
    @Override
    public int delete_huchi(String huchi_id) {
        try {
            logicMapper.delete_huchi(huchi_id);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**定制下的所有参数*/
    @Override
    public List<MlccCategoryTestInfo> querycanshuall(String module_id) {
        List<MlccCategoryTestInfo> datalist = logicMapper.querycanshuall(module_id);
        return datalist;
    }
    /**根据id查询互斥*/
    @Override
    public MutexTestInfo query_huzhiBydId(String huchi_id) {
        MutexTestInfo datainfo = logicMapper.query_huzhiBydId(huchi_id);
        return datainfo;
    }
    /**根据名称查询类别*/
    @Override
    public MlccCategoryTestInfo select_testlbDetailByname(String category_name) {
        MlccCategoryTestInfo datainfo = logicMapper.select_testlbDetailByname(category_name);
        return datainfo;
    }
    /**根据name查询定制项详情*/
    @Override
    public SmalltemplateTestInfo select_testDingzhiByname(String category_name) {
        SmalltemplateTestInfo datainfo = logicMapper.select_testDingzhiByname(category_name);
        return datainfo;
    }
    /**测试绣字部位列表*/
    @Override
    public IPage<CategoryLocationTestInfo> query_testlocaltionPageList(Page<CategoryLocationTestInfo> page, String category_id, String queryName, String queryCode) {
        IPage<CategoryLocationTestInfo> pagelist = logicMapper.query_testlocaltionPageList(page,category_id,queryName,queryCode);
        return pagelist;
    }
    /**测试绣字颜色列表*/
    @Override
    public IPage<EmbroideredColorTestInfo> query_testColorPageList(Page<EmbroideredColorTestInfo> page,String category_id, String queryName, String queryCode) {
        IPage<EmbroideredColorTestInfo> pagelist = logicMapper.query_testColorPageList(page,category_id,queryName,queryCode);
        return pagelist;
    }
    /**测试绣字图片列表*/
    @Override
    public IPage<EmbroideredFontTestInfo> query_testImgPageList(Page<EmbroideredFontTestInfo> page,String category_id, String queryName, String queryCode) {
        IPage<EmbroideredFontTestInfo> pagelist = logicMapper.query_testImgPageList(page,category_id,queryName,queryCode);
        return pagelist;
    }
    /**测试绣字字体列表*/
    @Override
    public IPage<EmbroideredFontTestInfo> query_testFontPageList(Page<EmbroideredFontTestInfo> page, String category_id,String queryName, String queryCode) {
        IPage<EmbroideredFontTestInfo> pagelist = logicMapper.query_testFontPageList(page,category_id,queryName,queryCode);
        return pagelist;
    }
    /**添加-绣字位置*/
    @Override
    public int add_xiuzi_location(CategoryLocationTestInfo testinfo) {
        try {
            logicMapper.add_xiuzi_location(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**修改-绣字位置*/
    @Override
    public int update_xiuzi_location(CategoryLocationTestInfo testinfo) {
        try {
            logicMapper.update_xiuzi_location(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**删除-绣字位置*/
    @Override
    public int delete_xiuzi_location(String id) {
        try {
            logicMapper.delete_xiuzi_location(id);
            return 1;
        }catch (Exception e){
            System.out.print("删除失败"+e.toString());
            return 0;
        }
    }
    /**添加-绣字颜色*/
    @Override
    public int add_xiuzi_color(EmbroideredColorTestInfo testinfo) {
        try {
            logicMapper.add_xiuzi_color(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("添加失败"+e.toString());
            return 0;
        }
    }
    /**修改-绣字颜色*/
    @Override
    public int update_xiuzi_color(EmbroideredColorTestInfo testinfo) {
        try {
            logicMapper.update_xiuzi_color(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**删除-绣字颜色*/
    @Override
    public int delete_xiuzi_color(String id) {
        try {
            logicMapper.delete_xiuzi_color(id);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**添加-绣字字体图片*/
    @Override
    public int add_xiuzi_fontImg(EmbroideredFontTestInfo testinfo) {
        try {
            logicMapper.add_xiuzi_fontImg(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**修改-绣字字体图片*/
    @Override
    public int update_xiuzi_fontImg(EmbroideredFontTestInfo testinfo) {
        try {
            logicMapper.update_xiuzi_fontImg(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**删除-绣字字体图片*/
    @Override
    public int delete_xiuzi_fontImg(String id) {
        try {
            logicMapper.delete_xiuzi_fontImg(id);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**新增绣字-字体图片-大小价格*/
    @Override
    public int add_xiuzi_fontImgSize(EmbroideredFontTestInfo testinfo) {
        try {
            logicMapper.add_xiuzi_fontImgSize(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**编辑绣字-字体图片-大小价格*/
    @Override
    public int update_xiuzi_fontImgSize(EmbroideredFontTestInfo testinfo) {
        try {
            logicMapper.update_xiuzi_fontImgSize(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**根据条件查询绣字类型价格*/
    @Override
    public EmbroideredFontTestInfo select_pricebyid(String leixing, String size) {
        EmbroideredFontTestInfo datainfo = logicMapper.select_pricebyid(leixing,size);
        return datainfo;
    }
    /**根据条件查询绣字类型价格*/
    @Override
    public CategoryLocationTestInfo select_test_xiuzi_locationDetail(String id) {
        CategoryLocationTestInfo datainfo = logicMapper.select_test_xiuzi_locationDetail(id);
        return datainfo;
    }
    /**根据条件查询绣字类型价格*/
    @Override
    public EmbroideredColorTestInfo select_test_xiuzi_colorDetail(String id) {
        EmbroideredColorTestInfo datainfo = logicMapper.select_test_xiuzi_colorDetail(id);
        return datainfo;
    }
    /**根据条件查询绣字类型价格*/
    @Override
    public EmbroideredFontTestInfo select_test_xiuzi_imgDetail(String id) {
        EmbroideredFontTestInfo datainfo = logicMapper.select_test_xiuzi_imgDetail(id);
        return datainfo;
    }
    /**测试撞色列表*/
    @Override
    public IPage<ContrastcolorTestInfo> query_testzhuangsePageList(Page<ContrastcolorTestInfo> page, String category_id, String queryName, String queryTime) {
        IPage<ContrastcolorTestInfo> pagelist = logicMapper.query_testzhuangsePageList(page,category_id,queryName,queryTime);
        return pagelist;
    }
    /**添加撞色列表*/
    @Override
    public int add_zhuangse(ContrastcolorTestInfo testinfo) {
        try {
            logicMapper.add_zhuangse(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**修改撞色列表*/
    @Override
    public int update_zhuangse(ContrastcolorTestInfo testinfo) {
        try {
            logicMapper.update_zhuangse(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**删除撞色列表*/
    @Override
    public int delete_zhuangse(String id) {
        try {
            logicMapper.delete_zhuangse(id);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**查询撞色列表*/
    @Override
    public ContrastcolorTestInfo query_zhuangseDetail(String id) {
        ContrastcolorTestInfo datainfo = logicMapper.query_zhuangseDetail(id);
        return datainfo;
    }
    /**分页加载体型数据*/
    @Override
    public IPage<BodySizeTestInfo> query_testBodySizePageList(Page<BodySizeTestInfo> page, String type, String category_id, String queryName, String queryTime) {
        IPage<BodySizeTestInfo> pagedatalist = logicMapper.query_testBodySizePageList(page,type,category_id,queryName,queryTime);
        return pagedatalist;
    }

    @Override
    public int add_testbodySize(BodySizeTestInfo testinfo) {
        try {
            logicMapper.add_testbodySize(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }

    @Override
    public int update_testbodySize(BodySizeTestInfo testinfo) {
        try {
            logicMapper.update_testbodySize(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }

    @Override
    public int delete_testbodySize(String id) {
        try {
            logicMapper.delete_testbodySize(id);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**查询尺寸的详情*/
    @Override
    public BodySizeTestInfo query_bodySizeDetail(String id) {
        BodySizeTestInfo datainfo = logicMapper.query_bodySizeDetail(id);
        return datainfo;
    }

    /**查询返修尺寸列表*/
    @Override
    public IPage<CategoryFanxiuTestInfo> query_testFanxiuSizePageList(Page<CategoryFanxiuTestInfo> page, String category_id, String queryName, String queryTime) {
        IPage<CategoryFanxiuTestInfo> pagedatalist = logicMapper.query_testFanxiuSizePageList(page,category_id,queryName,queryTime);
        return pagedatalist;
    }
    @Override
    public int add_testFanxiuSize(CategoryFanxiuTestInfo testinfo) {
        try {
            logicMapper.add_testFanxiuSize(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    @Override
    public int update_testFanxiuSize(CategoryFanxiuTestInfo testinfo) {
        try {
            logicMapper.update_testFanxiuSize(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    @Override
    public int delete_testfanxiuSize(String id) {
        try {
            logicMapper.delete_testfanxiuSize(id);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }
    /**查询返修尺寸的详情*/
    @Override
    public CategoryFanxiuTestInfo query_FanxiuSizeDetail(String id) {
        CategoryFanxiuTestInfo datainfo = logicMapper.query_FanxiuSizeDetail(id);
        return datainfo;
    }

    @Override
    public IPage<MlccCategoryTestInfo> query_testCategoryPageListBytype(Page<MlccCategoryTestInfo> page,String category_id,String type, String queryName, String queryCode) {
        IPage<MlccCategoryTestInfo> pagelist = logicMapper.query_testCategoryPageListBytype(page,category_id,type,queryName,queryCode);
        return pagelist;
    }
    /**删除品类或工艺*/
    @Override
    public int delete_testcategory(String id) {
        try {
            logicMapper.delete_testcategory(id);
            return 1;
        }catch (Exception e){
            System.out.print("更新失败"+e.toString());
            return 0;
        }
    }

    @Override
    public List<MlccCategoryTestInfo> query_AllcanshuBypingleiId(String category_id) {
        List<MlccCategoryTestInfo> datalist = logicMapper.query_AllcanshuBypingleiId(category_id);
        return datalist;
    }

    @Override
    public List<MutexTestInfo> query_AllhuchiBypingleiId(String category_id) {
        List<MutexTestInfo> datalist = logicMapper.query_AllhuchiBypingleiId(category_id);
        return datalist;
    }

    @Override
    public List<CategoryLocationTestInfo> query_Allxiuzi1BypingleiId(String category_id) {
        List<CategoryLocationTestInfo> datalist = logicMapper.query_Allxiuzi1BypingleiId(category_id);
        return datalist;
    }

    @Override
    public List<EmbroideredColorTestInfo> query_AllxiuziColorBypingleiId(String category_id) {
        List<EmbroideredColorTestInfo> datalist = logicMapper.query_AllxiuziColorBypingleiId(category_id);
        return datalist;
    }

    @Override
    public List<EmbroideredFontTestInfo> query_AllxiuziFontBypingleiId(String category_id) {
        List<EmbroideredFontTestInfo> datalist = logicMapper.query_AllxiuziFontBypingleiId(category_id);
        return datalist;
    }

    @Override
    public List<EmbroideredFontTestInfo> query_AllxiuziImgBypingleiId(String category_id) {
        List<EmbroideredFontTestInfo> datalist = logicMapper.query_AllxiuziImgBypingleiId(category_id);
        return datalist;
    }

    @Override
    public List<ContrastcolorTestInfo> query_AllzhuangseBypingleiId(String category_id) {
        List<ContrastcolorTestInfo> datalist = logicMapper.query_AllzhuangseBypingleiId(category_id);
        return datalist;
    }

    @Override
    public List<BodySizeTestInfo> query_AlljingtiBodysizeBypingleiId(String category_id) {
        List<BodySizeTestInfo> datalist = logicMapper.query_AlljingtiBodysizeBypingleiId(category_id);
        return datalist;
    }

    @Override
    public List<CategoryFanxiuTestInfo> query_AllFanxiuBypingleiId(String category_id) {
        List<CategoryFanxiuTestInfo> datalist = logicMapper.query_AllFanxiuBypingleiId(category_id);
        return datalist;
    }

    @Override
    public List<MlccCategoryTestInfo> query_AllGongyiBypingleiId(String category_id) {
        List<MlccCategoryTestInfo> datalist = logicMapper.query_AllGongyiBypingleiId(category_id);
        return datalist;
    }

    @Override
    public List<AddSystemPriceInfo> query_AllsyspriceBypingleiId(String category_id,int type) {
        List<AddSystemPriceInfo> datalist = logicMapper.query_AllsyspriceBypingleiId(category_id,type);
        return datalist;
    }
    //查询所有绣字高度
    @Override
    public List<EmbroidedHeightInfo> query_AllxiuziHeightBypingleiId(String category_id) {
        List<EmbroidedHeightInfo> datalist = logicMapper.query_AllxiuziHeightBypingleiId(category_id);
        return datalist;
    }

    //插入启用记录
    @Override
    public int add_qiyong_record(String category_id, String is_ping, String is_qiyong, String remark, String create_by, String sys_org_code) {
        try {
            logicMapper.add_qiyong_record(category_id,is_ping,is_qiyong,remark,create_by,sys_org_code);
            return 1;
        }catch (Exception e){
            System.out.print("插入记录失败"+e.toString());
            return 0;
        }
    }
    //根据品类id查询启用记录
    @Override
    public List<QiyongListInfo> query_QiyongRecrod(String category_id) {
        List<QiyongListInfo> datalist = logicMapper.query_QiyongRecrod(category_id);
        return datalist;
    }
    /**价格体系-添加类别表*/
    @Override
    public int add_pricesystem_category(String category_id, String business_type, String business_name, String is_gongyi, String create_by, String sys_org_code) {
        try {
            logicMapper.add_pricesystem_category(category_id,business_type,business_name,is_gongyi,create_by,sys_org_code);
            return 1;
        }catch (Exception e){
            System.out.print("插入价格体系失败"+e.toString());
            return 0;
        }
    }
    /**根据正式表中的测试品类id查询品类详情*/
    @Override
    public MlccCategoryInfo select_formal_categoryDetail(String testcategory_id) {
        MlccCategoryInfo datainfo = logicMapper.select_formal_categoryDetail(testcategory_id);
        return datainfo;
    }
    /**是否采用体型数据*/
    @Override
    public int update_category_size(String category_id, String is_size) {
        try {
            logicMapper.update_category_size(category_id,is_size);
            return 1;
        }catch (Exception e){
            System.out.print("失败"+e.toString());
            return 0;
        }
    }

    @Override
    public int add_fomal_syspriceinfo(AddSystemPriceInfo testinfo) {
        try {
            logicMapper.add_fomal_syspriceinfo(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("失败"+e.toString());
            return 0;
        }
    }

    @Override
    public int del_fomal_syspriceinfo(String id) {
        try {
            logicMapper.del_fomal_syspriceinfo(id);
            return 1;
        }catch (Exception e){
            System.out.print("失败"+e.toString());
            return 0;
        }
    }

    @Override
    public IPage<AddSystemPriceInfo> query_addpricePageList(Page<AddSystemPriceInfo> page, String category_id,String partent_id, String queryName, String queryTime) {
        IPage<AddSystemPriceInfo> pagelist = logicMapper.query_addpricePageList(page,category_id,partent_id,queryName,queryTime);
        return pagelist;
    }

    @Override
    public AddSystemPriceInfo query_addsyspriceDetail(String id) {
        AddSystemPriceInfo datainfo = logicMapper.query_addsyspriceDetail(id);
        return datainfo;
    }

    @Override
    public List<AddSystemPriceInfo> query_alladdsysprice(String category_id) {
        List<AddSystemPriceInfo> datalist = logicMapper.query_alladdsysprice(category_id);
        return datalist;
    }

    /**根据工艺id查询价格体系表*/
    @Override
    public AddSystemPriceInfo select_addSystempriceInfo(String gongyi_id,String is_ding) {
        AddSystemPriceInfo datainfo = logicMapper.select_addSystempriceInfo(gongyi_id,is_ding);
        return datainfo;
    }
    /**根据编号和名称和上级id查询正式的工艺详情*/
    @Override
    public MlccCategoryInfo select_canshu_gongyiDetailById(String category_code, String category_name, String zs_pingleiId, int type) {
        MlccCategoryInfo datainfo = logicMapper.select_canshu_gongyiDetailById(category_code,category_name,zs_pingleiId,type);
        return datainfo;
    }

    @Override
    public IPage<EmbroidedHeightInfo> query_testHeightPageList(Page<EmbroidedHeightInfo> page, String category_id, String queryName, String queryCode) {
        IPage<EmbroidedHeightInfo> pagelist = logicMapper.query_testHeightPageList(page,category_id,queryName,queryCode);
        return pagelist;
    }
    /**修改正式类别的状态*/
    @Override
    public int edit_category_status(String category_id, String status) {
        try {
            logicMapper.edit_category_status(category_id,status);
            return 1;
        }catch (Exception e){
            System.out.print("失败"+e.toString());
            return 0;
        }
    }

    @Override
    public ModuleSmalltemplateInfo queryDingzhiDetailByName(String name, String category_id,int status,int type) {
        ModuleSmalltemplateInfo datainfo = logicMapper.queryDingzhiDetailByName(name,category_id,status,type);
        return datainfo;
    }

    @Override
    public MlccCategoryInfo querycanshuDetailByCode(String code, String category_id,String dingzhi_id,int status,int type) {
        MlccCategoryInfo datainfo = logicMapper.querycanshuDetailByCode(code,category_id,dingzhi_id,status,type);
        return datainfo;
    }

    @Override
    public ContrastcolorInfo queryZhuangseDetailByCode(String code, String category_id,int status,int type) {
        ContrastcolorInfo datainfo = logicMapper.queryZhuangseDetailByCode(code,category_id,status,type);
        return datainfo;
    }

    @Override
    public CategoryFanxiuInfo queryfanxiuDetailByName(String name, String category_id,int status,int type) {
        CategoryFanxiuInfo datainfo = logicMapper.queryfanxiuDetailByName(name,category_id,status,type);
        return datainfo;
    }

    @Override
    public AddSystemPriceInfo queryshTypeDetailByName(String name, String category_id,int status,int type) {
        AddSystemPriceInfo datainfo = logicMapper.queryshTypeDetailByName(name,category_id,status,type);
        return datainfo;
    }

    @Override
    public AddSystemPriceInfo queryshoufeiDetailByName(String name, String category_id,int status,int type) {
        AddSystemPriceInfo datainfo = logicMapper.queryshoufeiDetailByName(name,category_id,status,type);
        return datainfo;
    }

    @Override
    public int change_dingzhi(SmalltemplateTestInfo testinfo) {
        try {
            logicMapper.change_dingzhi(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("失败"+e.toString());
            return 0;
        }
    }

    @Override
    public int change_dingzhi_canshu(MlccCategoryTestInfo testinfo) {
        try {
            logicMapper.change_dingzhi_canshu(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("失败"+e.toString());
            return 0;
        }
    }

    @Override
    public int change_zhuangse(ContrastcolorTestInfo testinfo) {
        try {
            logicMapper.change_zhuangse(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("失败"+e.toString());
            return 0;
        }
    }

    @Override
    public int change_fanxiu(CategoryFanxiuTestInfo testinfo) {
        try {
            logicMapper.change_fanxiu(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("失败"+e.toString());
            return 0;
        }
    }

    @Override
    public int change_shoufei(AddSystemPriceInfo testinfo) {
        try {
            logicMapper.change_shoufei(testinfo);
            return 1;
        }catch (Exception e){
            System.out.print("失败"+e.toString());
            return 0;
        }
    }

}
